﻿namespace Sidvall.IdentityManager.Data.IO.Entities
{
    public partial class AspNetUserLogins : global::Sidvall.Data.ServiceDataRowBase, global::Sidvall.IdentityManager.Data.IAspNetUserLogins
    {
        #region Public Members

        #region LoginProvider

        private string _LoginProvider;
        public string LoginProvider
        { 
            get
            {
                return _LoginProvider;
            }
            set
            {
                _LoginProvider = value;
            }
        }

        #endregion
        #region ProviderKey

        private string _ProviderKey;
        public string ProviderKey
        { 
            get
            {
                return _ProviderKey;
            }
            set
            {
                _ProviderKey = value;
            }
        }

        #endregion
        #region UserId

        private string _UserId;
        public string UserId
        { 
            get
            {
                return _UserId;
            }
            set
            {
                _UserId = value;
            }
        }

        #endregion
        
        public AspNetUsers AspNetUser { get; set; }
        
        #region DataRowContextStorageKey

        protected override string DataRowContextStorageKey
        {
            get
            {
                return global::Sidvall.IdentityManager.Data.IO.SystemContext.Current.EntityFacade.AspNetUserLoginsManager.GetKey(this);
            }
        }

        #endregion
        #region DataRowStateIsDirty

        protected override bool DataRowStateIsDirty
        {
            get
            {
                return global::Sidvall.IdentityManager.Data.IO.SystemContext.Current.EntityFacade.AspNetUserLoginsManager.DataRowStateIsDirty(this);
            }
        }

        #endregion

        #region IAspNetUserLogins Members

        string global::Sidvall.IdentityManager.Data.IAspNetUserLogins.LoginProvider
        {
            get
            {
                return _LoginProvider;
            }
            set
            {
                _LoginProvider = value;
            }
        }
        string global::Sidvall.IdentityManager.Data.IAspNetUserLogins.ProviderKey
        {
            get
            {
                return _ProviderKey;
            }
            set
            {
                _ProviderKey = value;
            }
        }
        string global::Sidvall.IdentityManager.Data.IAspNetUserLogins.UserId
        {
            get
            {
                return _UserId;
            }
            set
            {
                _UserId = value;
            }
        }
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
        global::Sidvall.IdentityManager.Data.IAspNetUsers global::Sidvall.IdentityManager.Data.IAspNetUserLogins.AspNetUser
        {
            get
            {
                return this.AspNetUser;
            }
            set
            {
                this.AspNetUser = value as AspNetUsers;
            }
        }

        #endregion

        #endregion
        #region Constructors

        public AspNetUserLogins() : this(false, null, null)
        {
        }
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
        public AspNetUserLogins(bool initializeChildren, Sidvall.Data.IDataRowContextProvider context, Sidvall.Data.DataRowState? dataRowState)
        {
            if ((context != null) || (dataRowState != null))
                SetDataRowContext(context, dataRowState);
            if (initializeChildren)
            {
            }
        }

        #endregion
    }
}